package com.qf.day01;

import java.util.Scanner;

public class homeWork {
    public static void main(String[] args) {
        int a, b, c;
        double s, area;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一条边长度");
        a = sc.nextInt();
        System.out.println("请输入第二条边长度");
        b = sc.nextInt();
        System.out.println("请输入第三条边长度");
        c = sc.nextInt();
        if (a + b > c && a + c > b && b + c > a) {
            System.out.println("可以构成三角形");
            s = (a + b + c) / 2;
            area = Math.sqrt(s * (s - a) * (s - b) * (s - c));
            System.out.println("这个三角形的面积是" + area);
        }else {
            System.out.println("不可以构成三角形");
        }

    }
}
